Memo formulae, If Statement, Format
Hi All,
I am new to Fastreports and am really struggling on a few issues. I am using Delphi 6 Professional. I am trying to do the following:
1. Format showing negative numbers in brackets. also format as a percentage?
2. formula in memo - if datafield2 = 0 then 0 otherwise (datafield1-datafield2)/datafield2
and
3. if datafield1 = "XYZ" then SUM(DATAFIELD3)
I just cannot see what I am doing wrong with my expressions in FastReports
Any help will be most appreciated.
Kind regards
Wayne
I am new to Fastreports and am really struggling on a few issues. I am using Delphi 6 Professional. I am trying to do the following:
1. Format showing negative numbers in brackets. also format as a percentage?
2. formula in memo - if datafield2 = 0 then 0 otherwise (datafield1-datafield2)/datafield2
and
3. if datafield1 = "XYZ" then SUM(DATAFIELD3)
I just cannot see what I am doing wrong with my expressions in FastReports
Any help will be most appreciated.
Kind regards
Wayne
Comments
Click context menu for your memo and choose formating
Ad.2.
Should be IIF( datafield2 = 0, 0, (datafield1-datafield2)/datafield2)
Ad.3.
This is more complicated. You should write your own on before event for summary band.
Something like: and your Memo should look like [gValue4Memo].
Read the documentation - some of your questions may be answered there